<!--
 * @Descripttion: 时间格式
 * @version: 0.0.1
 * @Author: linchun
 * @Date: 2021年12月22日10:12:39
 * @LastEditors: linchun
 * @LastEditTime: 2021-12-24 14:23:28
-->
<template>
  <el-select v-model="val" @change="change">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    ></el-option>
  </el-select>
</template>
<script>
export default {
  props: ["value","type"],
  data() {
    return {
      val: this.value,
      options: [
        {
          value: 1,
          label: "年月日时分秒",
        },
        {
          value: 2,
          label: "年月日",
        },
        {
          value: 3,
          label: "时分秒",
        },
        {
          value: 5,
          label: "时分",
        },
        {
          value: 4,
          label: "星期",
        },
      ],
    };
  },
  methods: {
    change(data) {
      this.$emit("change", {
        key:this.type,
        value:data
      });
    },
  },
};
</script>
